package acs.offer.constant;

public class EventType {
	 public static final int PING_REQUEST = 3;
	  public static final int CLICK_REQUEST = 4;

	  public static final int START_SERVICE = 5;

	  public static final int LWMF_INIT_COMPLETE = 6;

	  public static final int SERVICE_DEPENDENCY_COMPLETE = 7;

	  public static final int SERVICE_REGISTRATION_COMPLETE = 8;

	  public static final int RESPONSE_FOR_TARGET_OFFER = 101;
	  public static final int RESPONSE_FOR_TARGET_OFFER_ERROR = 104;
	  public static final int RESPONSE_DATA_PREPARED = 102;
	  public static final int RESPONSE_DATA_FAILED = 103;

	  public static final int TIMEOUT_WHEN_GET_TARGET_OFFER = 201;
	  public static final int TARGET_OFFER_CACHE_EXPIRED = 202;
	  public static final int TIMEOUT_FOR_CACHE_OFFER = 203;
	  public static final int TIMEOUT_FOR_DMS_SERVICE = 204;
	  public static final int TIMEOUT_FOR_DMS_TASK = 205;
	  public static final int TIMEOUT_FOR_LOAD_DATA = 206;
	  public static final int REMOVE_TASK = 207;

	  public static final int SMART_LINK_CLICK_REQUEST = 301;

	  public static final int UPDATE_SMART_LINK_CONFIG = 302;

	  public static final int SMART_LINK_SERVICE_INIT_FINISH = 303;

	  //AffiliateManager Event
	  public static final int SERVICE_AFFILIATE_INFO_COMPLETE = 401;
	  public static final int UPDATE_AFFILIATE_INFO = 402;
	  public static final int RESPONSE_FOR_REQUEST_AFFILIATE_INFO = 403;
	  public static final int TIMEOUT_WHEN_REQUEST_AFFILIATE_INFO = 404;
	  public static final int ERROR_WHEN_REQUEST_AFFILIATE_INFO = 405;

	  //SourceIdManager Event
	  public static final int SERVICE_SOURCE_ID_COMPLETE = 501;//init sourceIdManager Service complete
	  public static final int QUERY_SOURCE_ID = 502;//request sourceIdManager
	  public static final int RESPONSE_FOR_QUERY_SOURCE_ID = 503;//response from sourceIdManager
	  public static final int TIMEOUT_WHEN_QUERY_SOURCE_ID = 504;//timeout when querying sourceIdManager
	  public static final int UPDATE_SOURCE_ID = 505;//request pm to update sourceId cache
	  public static final int TIMEOUT_WHEN_REQUEST_SOURCE_ID = 506;//timeout when request pm
	  public static final int RESPONSE_FOR_REQUEST_SOURCE_ID = 507;//response from pm
	  public static final int ERROR_WHEN_REQUEST_SOURCE_ID = 508;//error when request pm

	  public static final int RESPONSE_RESULT = 601;

	  // convert outside request data to inner data
	  public static final int DATA_CONVERT = 701;

	  // router request base on the path of URI
	  public static final int REQUEST_ROUTE = 801;
	  //��ѯ����

	  public static final int QUERY_CACHE = 901;
	  //�����ѯ����
	  public static final int RESPONSE_FOR_DATA = 902;
	  public final static String getDescription(int eventType) {
	    String description;
	    switch (eventType) {
	      case PING_REQUEST:
	        description = "ping request";
	        break;
	      case CLICK_REQUEST:
	        description = "click request";
	        break;
	      case START_SERVICE:
	        description = "start service";
	        break;
	      case LWMF_INIT_COMPLETE:
	        description = "lwmf init complete";
	        break;
	      case SERVICE_DEPENDENCY_COMPLETE:
	        description = "service dependency complete";
	        break;
	      case SERVICE_REGISTRATION_COMPLETE:
	        description = "service registration complete";
	        break;
	      case RESPONSE_FOR_TARGET_OFFER:
	        description = "response for target offer";
	        break;
	      case RESPONSE_FOR_TARGET_OFFER_ERROR:
	        description = "response for target offer error";
	        break;
	      case RESPONSE_DATA_PREPARED:
	        description = "response data prepared";
	        break;
	      case RESPONSE_DATA_FAILED:
	        description = "response data failed";
	        break;
	      case TIMEOUT_WHEN_GET_TARGET_OFFER:
	        description = "timeout when get target offer";
	        break;
	      case TARGET_OFFER_CACHE_EXPIRED:
	        description = "target offer cache expired";
	        break;
	      case SMART_LINK_CLICK_REQUEST:
	        description = "smart link click request";
	        break;
	      case UPDATE_SMART_LINK_CONFIG:
	        description = "update smart link config";
	        break;
	      case SMART_LINK_SERVICE_INIT_FINISH:
	        description = "smart link service init finish";
	        break;
	      case SERVICE_AFFILIATE_INFO_COMPLETE:
	        description = "service affiliate info complete";
	        break;
	      case UPDATE_AFFILIATE_INFO:
	        description = "update affiliate info";
	        break;
	      case RESPONSE_FOR_REQUEST_AFFILIATE_INFO:
	        description = "response for request affiliate info";
	        break;
	      case TIMEOUT_WHEN_REQUEST_AFFILIATE_INFO:
	        description = "timeout when request affiliate info";
	        break;
	      case ERROR_WHEN_REQUEST_AFFILIATE_INFO:
	        description = "error when request affiliate info";
	        break;
	      case SERVICE_SOURCE_ID_COMPLETE:
	        description = "service source id complete";
	        break;
	      case QUERY_SOURCE_ID:
	        description = "query source id";
	        break;
	      case RESPONSE_FOR_QUERY_SOURCE_ID:
	        description = "response for query source id";
	        break;
	      case TIMEOUT_WHEN_QUERY_SOURCE_ID:
	        description = "timeout when query source id";
	        break;
	      case UPDATE_SOURCE_ID:
	        description = "update source id";
	        break;
	      case TIMEOUT_WHEN_REQUEST_SOURCE_ID:
	        description = "timeout when request source id";
	        break;
	      case RESPONSE_FOR_REQUEST_SOURCE_ID:
	        description = "response for request source id";
	        break;
	      case ERROR_WHEN_REQUEST_SOURCE_ID:
	        description = "error when request source id";
	        break;
	      case RESPONSE_RESULT:
	        description = "response result";
	        break;
	      case DATA_CONVERT:
	        description = "data convert";
	        break;
	      case REQUEST_ROUTE:
	        description = "request route";
	        break;
	      default:
	        description = String.valueOf(eventType);
	        break;
	    }
	    return description;
	  }
	}
